(($) -> 
	# This function will serve a debugger for now because using alert method to quick debug is starting to
	# to get pretty annoying. Eventually this can be rewritten to be a tooltip implementation.
	#
	
	$.fn.dbg = (msg) ->
	
		$pageCSS = '
			<style type="text/css">

					.dropDownCell, .inputTypeCell{
							height: 40px;
							}
							
					.dropDownCell, #edit > font{
							cursor: hand;
							}
							
					#genTextArea{
							width: 100%;
							border: solid 1px gray;
							}
					
					#msgDisplay{
							height: 30px;
							position: absolute;
							text-align: center;
							}
					
					#msgDisplay > font{
							padding-left: 10px;
							padding-right: 10px;
							background-color: #A2CD5A !important;
							font-size: 15px;
							color: #000000;
							}
					
			</style>'
		
		unless msg
			@before("<div id='msgDisplay' style='width: #{window.innerWidth};'>
			<font style='font-size: 14px; display: none;'></font>
			</div>")
			$('#msgDisplay')
				.css('top' : window.pageYOffset)
				.css('width' : window.innerWidth)
			
			$('#msgDisplay').before('<div id="hiddenWrapper" style="display: none !important;"></div>')
			$('#hiddenWrapper').before($pageCSS)
		else
			$('#msgDisplay > font').delay(100).hide(0).text(msg).fadeIn(200)
		return

)(jQuery)
